<?php
defined('PHP5_PHP') or die("Application is stopping!!!");
$smarty->assign('user_id', $php5Session->getVar("user_id"));
$smarty->assign('user_name', $php5Session->getVar("user_name"));
$smarty->assign('user_username', $php5Session->getVar("user_username"));
$smarty->assign('user_type', $php5Session->getVar("user_type"));
$smarty->assign('modules', $module);

$smarty->assign('menuhome', '1');
$smarty->assign('menubook', '1');
$smarty->assign('menumybooking', '1');
$smarty->assign('menutransaction', '1');
$smarty->assign('menucontact', '1');
$smarty->assign('menufaq', '1');
$smarty->assign('menumyaccount', '1');
$smarty->assign('menureport', '1');
$smarty->assign('menuannouncement', '1');
if($type=="myaccount") {
	$smarty->assign('menumyaccount', '');
}
if($type=="cpanel") {
	$smarty->assign('menuhome', '');
}
if($type=="booking-room") {
	$smarty->assign('menubook', '');
}

if($type=="mybooking") {
	$smarty->assign('menumybooking', '');
}

if($type=="transaction_history") {
	$smarty->assign('menutransaction', '');
}
if($type=="contact") {
	$smarty->assign('menucontact', '');
}
if($type=="faq") {
	$smarty->assign('menufaq', '');
}
if($type=="menumyaccount") {
	$smarty->assign('menumyaccount', '');
}
if($type=="menureport") {
	$smarty->assign('menureport', '');
}
if($type=="menuannouncement") {
	$smarty->assign('menuannouncement', '');
}


$menu_tpl = sprintf($php5TemplateFile, $language, 'main', 'menu.tpl');
$smarty->assign('url_logout', sefBuild($php5WebPath, 'index.php?o=logout', 1));
$smarty->assign('url_home', sefBuild($php5WebPath, '', 1));
$smarty->assign('url_book', sefBuild($php5WebPath, 'index.php?o=booking-room', 1));
$smarty->assign('url_setting', sefBuild($php5WebPath, 'index.php?o=settings&m=generate', 1));
$smarty->assign('url_setting_booking_date', sefBuild($php5WebPath, 'index.php?o=settings&m=booking-date', 1));
$smarty->assign('url_setting_blockout', sefBuild($php5WebPath, 'index.php?o=settings&m=blockout', 1));
$smarty->assign('url_setting_template', sefBuild($php5WebPath, 'index.php?o=settings&m=term', 1));
$smarty->assign('url_setting_term', sefBuild($php5WebPath, 'index.php?o=settings&m=term', 1));
$smarty->assign('url_setting_contactus', sefBuild($php5WebPath, 'index.php?o=settings&m=contact', 1));
$smarty->assign('url_setting_email', sefBuild($php5WebPath, 'index.php?o=settings&m=email', 1));
$smarty->assign('url_mybooking', sefBuild($php5WebPath, 'index.php?o=mybooking', 1));
$smarty->assign('url_transaction', sefBuild($php5WebPath, 'index.php?o=transaction_history', 1));
$smarty->assign('url_contact', sefBuild($php5WebPath, 'index.php?o=contact', 1));
$smarty->assign('url_faq', sefBuild($php5WebPath, 'index.php?o=faq', 1));
$smarty->assign('url_account', sefBuild($php5WebPath, 'index.php?o=myaccount', 1));
$smarty->assign('url_user', sefBuild($php5WebPath, 'index.php?o=users', 1));
$smarty->assign('url_add_user', sefBuild($php5WebPath, 'index.php?o=users&m=create', 1));
$smarty->assign('url_room', sefBuild($php5WebPath, 'index.php?o=booking-room&m=list-rooms', 1));
$smarty->assign('url_add_room', sefBuild($php5WebPath, 'index.php?o=booking-room&m=create', 1));
$smarty->assign('url_add_room_vip', sefBuild($php5WebPath, 'index.php?o=booking-room&m=create-vip-slots', 1));
$smarty->assign('url_report', sefBuild($php5WebPath, 'index.php?o=reports', 1));
$smarty->assign('url_announcement', sefBuild($php5WebPath, 'index.php?o=announcements', 1));
$smarty->assign('url_promotion', sefBuild($php5WebPath, 'index.php?o=promotion', 1));

$smarty->assign('menu', $smarty->fetch($menu_tpl));
$submenu_tpl = sprintf($php5TemplateFile, $language, 'main', 'submenu.tpl');
$smarty->assign('submenu', $smarty->fetch($submenu_tpl));
?>